<div id="news">
<h4> Upfile </h4>
</div>
<?php
	$sql="SELECT * FROM upfile  ORDER BY datepost DESC";
	$spql=$dp->QueryAll($sql);
?>
<table width="100%"  border="1" cellspacing="5" cellpadding="5">
	<tr>
		<td width="20" align="center" valign="middle"><strong>STT</strong></td>
		<td width="100" align="center" valign="middle"><strong>Lớp</strong></td>
		
		<td width="100" align="center" valign="middle"><strong>Tên FIle</strong></td>
		<td width="150" align="center" valign="middle"><strong>Tải về</strong></td>
		<td width="150" align="center" valign="middle"><strong>Ngày đăng</strong></td>
		<td width="50" align="center" valign="middle"><strong>Xóa</strong></td>

	</tr>
	<?php 
		for($i=0;$i<count($spql);$i++)
		{
			$id=$spql[$i]['id'];
			$file=$spql[$i]['file'];
		    $lop=$spql[$i]['lop'];
			$datepost=$spql[$i]['datepost'];
			
			$link="../../12/baitap/"."$lop/".$file;
		    $delete="<img src='IMAGES/xoa.png' />";
			$update="<img src='IMAGES/sua.png' />";
	?>
	<tr>
		<td width="20" align="center" valign="middle"><?php echo ($i+1); ?></td>
		 <td align="center"><?php echo $lop;?></td>
	     <td align="center"><?php echo $file; ?></td>
		<td ><div id ="chitiet">
		   <a href=" <?php echo $link ?>"> Xem /Tải về >> </a><img src='IMAGES/dload.png' />
		 </div></td>
			<td align="center"><?php echo $datepost;?></td>
		
				<td align="center">
			<a href="index.php?option=upfile&cat=delete&id=<?php echo $id?>">
			<?php echo $delete;?>
			</a>
		</td>
		
	
	</tr>
	<?php
		}
	?>
</table>